#define Dryer_Variable

#include "userDef.h"

void DryerAct(void)
{
#ifdef KONGKE
    set_dryer(OFF);
    DryerActMin = 0;
    DryerActSec = 0;

    return;
#endif

    if (ErrFlagQT == 0 && ErrFlag == 0)
    {
        if (DryerActMin > 0)
        {
            if (b_power.run == ON || b_dryer.set == OFF)
            {
                set_dryer(OFF);
                DryerActMin = 0;
                DryerActSec = 0;
            }
        }
        else
        {
            if (b_power.run == OFF && b_dryer.set == ON)
            {
                DryerActMin = 10;
                DryerActSec = 0;
            }
        }
    }
    else
    {
        set_dryer(OFF);
        DryerActMin = 0;
        DryerActSec = 0;
    }
}

void DryerTime(void)
{
    if (DryerActMin > 0)
    {
        DryerActSec++;

        if (DryerActSec >= 60)
        {
            DryerActSec = 0;

            if (DryerActMin > Norm01Fast05)
            {
                DryerActMin -= Norm01Fast05;
            }
            else
            {
                DryerActMin = 0;

                set_dryer(OFF);

#ifdef CTRL_485
                update_wireCtrl = 2;
#endif
            }
        }
    }
    else
    {
        DryerActMin = 0;
        DryerActSec = 0;
    }
}
